//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
/***********************************************************************************/
/*                        M-Systems Confidential                                   */
/*           Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2003            */
/*                         All Rights Reserved                                     */
/***********************************************************************************/
/*                            NOTICE OF M-SYSTEMS OEM                              */
/*                           SOFTWARE LICENSE AGREEMENT                            */
/*                                                                                 */
/*      THE USE OF THIS SOFTWARE IS GOVERNED BY A SEPARATE LICENSE                 */
/*      AGREEMENT BETWEEN THE OEM AND M-SYSTEMS. REFER TO THAT AGREEMENT           */
/*      FOR THE SPECIFIC TERMS AND CONDITIONS OF USE,                              */
/*      OR CONTACT M-SYSTEMS FOR LICENSE ASSISTANCE:                               */
/*      E-MAIL = info@m-sys.com                                                    */
/***********************************************************************************/

/*
 * $Log:   &
 */

/*****************************************************************************
* File Header                                                                *
* -----------                                                                *
* Name : flsystyp.h                                                          *
*                                                                            *
* Description : System defintions and types required for the implementation  *
*              of the system customization routines.                         *
*                                                                            *
*****************************************************************************/

#ifndef FLSYSTYPE_H
#define FLSYSTYPE_H

/* Error status codes */

#include "flstatus.h"

/* General types definitions */

typedef int            FLBoolean;
typedef unsigned char  FLByte;           /* 8  bit unsigned variable */
typedef unsigned short FLWord;           /* 16 bit unsigned variable */
typedef unsigned long  FLDword;          /* 32 bit unsigned variable */
typedef unsigned int   FLNative;         /* Native variable at least 16 bits */
typedef signed char    FLSByte;          /* 8  bit signed variable */
typedef signed short   FLSWord;          /* 16 bit signed variable */
typedef signed long    FLSDword;         /* 32 bit signed variable */
typedef int            FLSNative;        /* Signed native variable at least 16 bits */
typedef FLSWord        FLWchar;          /* Unicode type variable */
typedef FLDword        CardAddress ;	 /* Physical offset on card */

/* DMA interface routine */

typedef struct
{
  FLWord wDiskOnChip_Offset ;
  FLWord wFrameSize ;
  FLWord wFramesInBlock ;
  FLWord wFramesXferred ;
  FLByte *bDiskOnChip_BasePtr ;
  FLByte *bDestAddrPtr ;
  FLByte bOpType ;
  FLByte bIrHandle ;
  FLBoolean fDmaStatus ;
  void *DrvParamsPtr ;
} DMA_Params_S  ;

/* Boolean constants */

#ifndef FALSE
#define FALSE    0
#endif /* FALSE */
#ifndef TRUE
#define TRUE     1
#endif /* TRUE */
#define FL_ON    1
#define FL_OFF   0

/* Backward competible x86 pointer definitions (far and huge) */

#ifndef HUGE
#define HUGE
#endif /* HUGE */
#ifndef FAR0
#define FAR0
#endif /* FAR0 */

#ifndef FAR1
#define FAR1
#endif /* FAR1 */

#ifndef FAR2
#define FAR2
#endif /* FAR2 */

/* Zones for debug printing */

#define FLZONE_NONE       0
#define FLZONE_MTD        0x0001
#define FLZONE_BDK        0x0002
#define FLZONE_TL         0x0004
#define FLZONE_BLKDEV     0x0008
#define FLZONE_FORMAT     0x0010
#define FLZONE_FS         0x0020
#define FLZONE_SOCKET     0x0040
#define FLZONE_IOCTL      0x0080
#define FLZONE_PROD       0x0100
#define FLZONE_STATISTICS 0x0200
#define FLZONE_UTIL       0x0400
#define FLZONE_PARA       0x0800
#define FLZONE_FULL       0xffff

#endif /* FLSYSTYPE_H */
